<?php
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;

/* $this yii\web\View; */
/* $model backend\modules\admin\models\Role */
?>

<div class="row">
    <div class="col-xs-12">
        <div style="height:20px"></div>
            <?php
            $label_class = ['class'=>'col-sm-3 control-label no-padding-right'];
            $form = ActiveForm::begin([
                'fieldConfig'=>[
                'options' => ['enctype' => 'multipart/form-data', 'class' => 'form-horizontal'],
                'template'=> "<div class=\"form-group\">{label}\n<div class=\"col-sm-3\">{input}</div><div class=\"col-sm-3\">{error}</div></div>",
                'labelOptions' =>['class' => $label_class],
                ],
                'method' => 'post',
            ]);
            ?>
            <?= $form->field($role, 'rolename')->textInput(['maxlength' => 20])?>
            <?= $form->field($role, 'listorder')->textInput(['maxlength' => 10,'style'=>'width:60px;'])?>
            <?= $form->field($role, 'status')->dropDownList([0=>'启用',2=>'关闭'],['style'=>'width:150px;'])?>
            <?= $form->field($role, 'description')->textarea(['rows'=>3])?>

            <div class="clearfix">
                <div class="col-md-offset-3 col-md-9">
                    <?= Html::submitButton('提交', ['class'=>'btn btn-info','name' =>'submit-button']) ?>
                    <?= Html::resetButton('重置', ['class'=>'btn btn-primary','name' =>'reset-button']) ?>
                </div>
            </div>
            <?php ActiveForm::end(); ?>
            <div class="space-4"></div>
        </div><!-- /.col -->

    </div><!-- /.row -->

